<template>
<div class="components1">
    <div>
        <input type="button" @click="add" value="++" />
        <input type="button" @click="addAsync" value="async++" />
        <input type="button" @click="decrement" value="--" />
        <h2>Clicked: num is {{$store.state.count.num}}</h2>
    </div>
</div>
</template>

<script>
import {
    mapGetters,
    mapActions
} from 'vuex'

export default {
    name: 'comp1',
    data() {
        return {
            msg: '',
            num: null
        }
    },
    methods: {
        ...mapActions({
            add:'count/add',
            decrement:'count/decrement',
            addAsync:'count/addAsync'
        }),
        showData:function(){
            console.log();
        }
    },
    mounted() {
        this.showData();
    },
}
</script>

<style scoped lang="scss"></style>
